3.2669 \(\int x^m (a+b x^n) \, dx\)

Optimal. Leaf size=27 \[ \frac {a x^{m+1}}{m+1}+\frac {b x^{m+n+1}}{m+n+1} \]

[Out]

a*x^(1+m)/(1+m)+b*x^(1+m+n)/(1+m+n)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \[ \frac {a x^{m+1}}{m+1}+\frac {b x^{m+n+1}}{m+n+1} \]

Antiderivative was successfully verified.

[In]

Int[x^m*(a + b*x^n),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(1 + m + n))/(1 + m + n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int x^m \left (a+b x^n\right ) \, dx &=\int \left (a x^m+b x^{m+n}\right ) \, dx\\ &=\frac {a x^{1+m}}{1+m}+\frac {b x^{1+m+n}}{1+m+n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 27, normalized size = 1.00 \[ \frac {a x^{m+1}}{m+1}+\frac {b x^{m+n+1}}{m+n+1} \]

Antiderivative was successfully verified.

[In]

Integrate[x^m*(a + b*x^n),x]

[Out]

(a*x^(1 + m))/(1 + m) + (b*x^(1 + m + n))/(1 + m + n)

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 43, normalized size = 1.59 \[ \frac {{\left (b m + b\right )} x x^{m} x^{n} + {\left (a m + a n + a\right )} x x^{m}}{m^{2} + {\left (m + 1\right )} n + 2 \, m + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="fricas")

[Out]

((b*m + b)*x*x^m*x^n + (a*m + a*n + a)*x*x^m)/(m^2 + (m + 1)*n + 2*m + 1)

________________________________________________________________________________________

giac [B]  time = 0.16, size = 55, normalized size = 2.04 \[ \frac {b m x x^{m} x^{n} + a m x x^{m} + a n x x^{m} + b x x^{m} x^{n} + a x x^{m}}{m^{2} + m n + 2 \, m + n + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="giac")

[Out]

(b*m*x*x^m*x^n + a*m*x*x^m + a*n*x*x^m + b*x*x^m*x^n + a*x*x^m)/(m^2 + m*n + 2*m + n + 1)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 34, normalized size = 1.26 \[ \frac {b x \,{\mathrm e}^{m \ln \relax (x )} {\mathrm e}^{n \ln \relax (x )}}{m +n +1}+\frac {a x \,{\mathrm e}^{m \ln \relax (x )}}{m +1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(b*x^n+a),x)

[Out]

a/(m+1)*x*exp(m*ln(x))+b/(m+n+1)*x*exp(m*ln(x))*exp(n*ln(x))

________________________________________________________________________________________

maxima [A]  time = 0.61, size = 27, normalized size = 1.00 \[ \frac {b x^{m + n + 1}}{m + n + 1} + \frac {a x^{m + 1}}{m + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(a+b*x^n),x, algorithm="maxima")

[Out]

b*x^(m + n + 1)/(m + n + 1) + a*x^(m + 1)/(m + 1)

________________________________________________________________________________________

mupad [B]  time = 1.40, size = 27, normalized size = 1.00 \[ \frac {a\,x\,x^m}{m+1}+\frac {b\,x\,x^m\,x^n}{m+n+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(a + b*x^n),x)

[Out]

(a*x*x^m)/(m + 1) + (b*x*x^m*x^n)/(m + n + 1)

________________________________________________________________________________________

sympy [A]  time = 3.42, size = 175, normalized size = 6.48 \[ \begin {cases} \left (a + b\right ) \log {\relax (x )} & \text {for}\: m = -1 \wedge n = 0 \\a \log {\relax (x )} + \frac {b x^{n}}{n} & \text {for}\: m = -1 \\\frac {a m x x^{m}}{m^{2} + m} + \frac {b m^{2} \log {\relax (x )}}{m^{2} + m} + \frac {b m \log {\relax (x )}}{m^{2} + m} & \text {for}\: n = - m - 1 \\\frac {a m x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac {a n x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac {a x x^{m}}{m^{2} + m n + 2 m + n + 1} + \frac {b m x x^{m} x^{n}}{m^{2} + m n + 2 m + n + 1} + \frac {b x x^{m} x^{n}}{m^{2} + m n + 2 m + n + 1} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(a+b*x**n),x)

[Out]

Piecewise(((a + b)*log(x), Eq(m, -1) & Eq(n, 0)), (a*log(x) + b*x**n/n, Eq(m, -1)), (a*m*x*x**m/(m**2 + m) + b
*m**2*log(x)/(m**2 + m) + b*m*log(x)/(m**2 + m), Eq(n, -m - 1)), (a*m*x*x**m/(m**2 + m*n + 2*m + n + 1) + a*n*
x*x**m/(m**2 + m*n + 2*m + n + 1) + a*x*x**m/(m**2 + m*n + 2*m + n + 1) + b*m*x*x**m*x**n/(m**2 + m*n + 2*m +
n + 1) + b*x*x**m*x**n/(m**2 + m*n + 2*m + n + 1), True))

________________________________________________________________________________________